Skip to content

Conversation

@DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Jan 12, 2026

Based on #38001

Screenshot 2026-01-14 at 15 19 19

Attaches and displays extra information on diagnostics about the origin of deprecated values.

Fixes #

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@DanielMSchmidt DanielMSchmidt added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Jan 12, 2026
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch 3 times, most recently from 6e72b27 to a12e649 Compare January 13, 2026 14:31
@DanielMSchmidt DanielMSchmidt marked this pull request as ready for review January 13, 2026 14:32
@DanielMSchmidt DanielMSchmidt requested a review from a team as a code owner January 13, 2026 14:32
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch from fbfd15f to ca88f6f Compare January 14, 2026 13:15
Copy link
Member

@jbardin jbardin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something we need to be careful of is that UnmarkDeep is a very expensive operation, so it needs to be kept out of any hot paths in Terraform. I'm not seeing anything concerning yet after removing the recursive validation in count/for_each, but I can take a closer look on the other PRs too.

@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch 7 times, most recently from e7bf756 to 1becc84 Compare January 20, 2026 16:20
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch from 1becc84 to 1f5c492 Compare January 20, 2026 16:27
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from daa048d to 710afaa Compare January 20, 2026 19:35
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch 2 times, most recently from a52acd5 to 63e51e0 Compare January 20, 2026 19:46
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from 710afaa to fed3ea9 Compare January 21, 2026 08:25
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch from 63e51e0 to de0d028 Compare January 21, 2026 08:30
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from fed3ea9 to a9cb1c9 Compare January 21, 2026 14:35
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch 4 times, most recently from 4f969c4 to 3f705da Compare January 22, 2026 14:58
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from a9cb1c9 to f877341 Compare January 26, 2026 08:49
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch from 3f705da to 5f40540 Compare January 26, 2026 08:50
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from f877341 to d79bf08 Compare January 27, 2026 13:04
We want to be able to give better information if e.g. the entire module is stored in a local and the deprecated value is only later used.

Where the diag is emitted we might only see the local and not the true origin of the deprecation

A string identifying the source of the deprecation should help
…rtain locations

Mainly terminal locations for the value where they are used, such as the config of a resource, for_each, outputs.
We don't want to evaluate the deprecation deeply when it comes to values where the value is not yet used, e.g. locals
This is because if e.g. a deeply nested value is deprecated it should still be ok for the entire object to be in a local
whereas the same object should give a warning in e.g. an output
@DanielMSchmidt DanielMSchmidt force-pushed the deprecation-diagnostics-extra-origin branch from 5f40540 to f2387a8 Compare January 27, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants